<?php

use Drupal\shusy_banner\Entity\ShusyBanner;
use Drupal\shusy_banner\Entity\ShusyBannerItem;

function shusy_banner_shusy_banner_add_page() {
  $e = new ShusyBanner();
  module_load_include('inc', 'shusy_banner', 'shusy_banner.forms');
  return drupal_get_form('shusy_banner_shusy_banner_entity_form', $e, 'add');
}

function shusy_banner_shusy_banner_view_page(ShusyBanner $e) {
  return entity_view($e->entityType(), [$e]);
}

function shusy_banner_shusy_banner_edit_page(ShusyBanner $e) {
  module_load_include('inc', 'shusy_banner', 'shusy_banner.forms');
  return drupal_get_form('shusy_banner_shusy_banner_entity_form', $e, 'edit');
}

function shusy_banner_shusy_banner_delete_page(ShusyBanner $e) {
  module_load_include('inc', 'shusy_banner', 'shusy_banner.forms');
  return drupal_get_form('shusy_banner_shusy_banner_delete_form', $e);
}

function shusy_banner_shusy_banner_item_add_page() {
  $e = new ShusyBannerItem();
  module_load_include('inc', 'shusy_banner', 'shusy_banner.forms');
  return drupal_get_form('shusy_banner_shusy_banner_item_entity_form', $e, 'add');
}

function shusy_banner_shusy_banner_item_view_page(ShusyBannerItem $e) {
  return entity_view($e->entityType(), [$e]);
}

function shusy_banner_shusy_banner_item_edit_page(ShusyBannerItem $e) {
  module_load_include('inc', 'shusy_banner', 'shusy_banner.forms');
  return drupal_get_form('shusy_banner_shusy_banner_item_entity_form', $e, 'edit');
}

function shusy_banner_shusy_banner_item_delete_page(ShusyBannerItem $e) {
  module_load_include('inc', 'shusy_banner', 'shusy_banner.forms');
  return drupal_get_form('shusy_banner_shusy_banner_item_delete_form', $e);
}

